NBPExtract
TheNBPExtract
function returns one tuple (entity name and internet address) from the list of tuples placed in a buffer by thePLookupName
function.
FUNCTION NBPExtract (theBuffer: Ptr; numInBuf: Integer; whichOne: Integer; VAR abEntity: EntityName; VAR address: AddrBlock): OSErr;
theBuffer
- A pointer to the buffer containing the tuples returned by the
PLookupName
function.numInBuf
- The number of tuples returned by the
PLookupName
function in thenumGotten
parameter.whichOne
- The sequence number of the tuple that you want the function to return. This parameter can be any integer in the range 1 through
numInBuf
.abEntity
- A pointer to a buffer that you provide to hold the name returned by the function. This buffer must be at least 102 bytes long.
address
- A pointer to a buffer that you provide to hold the address returned by the function. The buffer must be at least 4 bytes long.
DESCRIPTION
TheNBPExtract
function extracts a name and address pair from the list of tuples that thePLookupName
function returns. ThePLookupName
function returns the names of network-visible entities in a packed format that you cannot read from Pascal. Use theNBPExtract
function in a loop that varies the value of thewhichOne
parameter from 1 to the total number of tuples in the list to extract all the names in the list.ASSEMBLY-LANGUAGE INFORMATION
TheNBPExtract
function is implemented entirely in the MPW interface files. There is no assembly-language equivalent to this procedure.RESULT CODES
noErr 0 No error extractErr -3104 Can't find tuple in buffer SEE ALSO
To look up the name and address of an entity registered with NBP, use thePLookupName
function, described on page 3-28.For a description of the
EntityName
data type, see "Entity Name Record" on page 3-20.For a description of the
AddrBlock
data type, see "Address Block Record" on page 3-19.